<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
//特碼樣版
$arrCon = file($strTemplatePath."NumberTemplate010203.html");
$strCon010203 = join("", $arrCon);
$strCon010203 = str_replace(chr(13), "", $strCon010203);
$strCon010203 = str_replace(chr(10), "", $strCon010203);

//正碼樣版
$arrCon = file($strTemplatePath."NumberTemplate040506.html");
$strCon040506 = join("", $arrCon);
$strCon040506 = str_replace(chr(13), "", $strCon040506);
$strCon040506 = str_replace(chr(10), "", $strCon040506);

//連碼樣版
$arrCon = file($strTemplatePath."NumberTemplate0711.html");
$strCon0711 = join("", $arrCon);
$strCon0711 = str_replace(chr(13), "", $strCon0711);
$strCon0711 = str_replace(chr(10), "", $strCon0711);

//正碼 1-6 樣版
$arrCon = file($strTemplatePath."NumberTemplate121314.html");
$strCon121314 = join("", $arrCon);
$strCon121314 = str_replace(chr(13), "", $strCon121314);
$strCon121314 = str_replace(chr(10), "", $strCon121314);

//正碼 1-6 過關 樣版
$arrCon = file($strTemplatePath."NumberTemplate15.html");
$strCon15 = join("", $arrCon);
$strCon15 = str_replace(chr(13), "", $strCon15);
$strCon15 = str_replace(chr(10), "", $strCon15);

//連碼樣版
$arrCon = file($strTemplatePath."NumberTemplate0711.html");
$strCon0711 = join("", $arrCon);
$strCon0711 = str_replace(chr(13), "", $strCon0711);
$strCon0711 = str_replace(chr(10), "", $strCon0711);

//特碼生肖色波樣版
$arrCon = file($strTemplatePath."NumberTemplate1718.html");
$strCon1718 = join("", $arrCon);
$strCon1718 = str_replace(chr(13), "", $strCon1718);
$strCon1718 = str_replace(chr(10), "", $strCon1718);

//一般生肖尾數樣版
$arrCon = file($strTemplatePath."NumberTemplate1920.html");
$strCon1920 = join("", $arrCon);
$strCon1920 = str_replace(chr(13), "", $strCon1920);
$strCon1920 = str_replace(chr(10), "", $strCon1920);

//正1-6特樣版
$arrCon = file($strTemplatePath."NumberTemplate2126.html");
$strCon2126 = join("", $arrCon);
$strCon2126 = str_replace(chr(13), "", $strCon2126);
$strCon2126 = str_replace(chr(10), "", $strCon2126);

//半波樣版
$arrCon = file($strTemplatePath."NumberTemplate29.html");
$strCon29 = join("", $arrCon);
$strCon29 = str_replace(chr(13), "", $strCon29);
$strCon29 = str_replace(chr(10), "", $strCon29);

//五不中樣版
$arrCon = file($strTemplatePath."NumberTemplate31.html");
$strCon31 = join("", $arrCon);
$strCon31 = str_replace(chr(13), "", $strCon31);
$strCon31 = str_replace(chr(10), "", $strCon31);

//生肖連樣版
$arrCon = file($strTemplatePath."NumberTemplate3237.html");
$strCon3237 = join("", $arrCon);
$strCon3237 = str_replace(chr(13), "", $strCon3237);
$strCon3237 = str_replace(chr(10), "", $strCon3237);

//尾數連樣版
$arrCon = file($strTemplatePath."NumberTemplate3843.html");
$strCon3843 = join("", $arrCon);
$strCon3843 = str_replace(chr(13), "", $strCon3843);
$strCon3843 = str_replace(chr(10), "", $strCon3843);

//已開獎樣版
$arrCon = file($strTemplatePath."StartGameTemplate.html");
$strConSG = join("", $arrCon);
$strConSG = str_replace(chr(13), "", $strConSG);
$strConSG = str_replace(chr(10), "", $strConSG);
foreach($_strOperate as $k => $v){
	$strCon010203 = str_replace("{".$k."}", $v, $strCon010203);
	$strCon040506 = str_replace("{".$k."}", $v, $strCon040506);
	$strCon0711 = str_replace("{".$k."}", $v, $strCon0711);
	$strCon121314 = str_replace("{".$k."}", $v, $strCon121314);
	$strCon15 = str_replace("{".$k."}", $v, $strCon15);
	$strCon1718 = str_replace("{".$k."}", $v, $strCon1718);
	$strCon1920 = str_replace("{".$k."}", $v, $strCon1920);
	$strCon2126 = str_replace("{".$k."}", $v, $strCon2126);
	$strCon29 = str_replace("{".$k."}", $v, $strCon29);
	$strCon31 = str_replace("{".$k."}", $v, $strCon31);
	$strCon3237 = str_replace("{".$k."}", $v, $strCon3237);
	$strCon3843 = str_replace("{".$k."}", $v, $strCon3843);
	$strConSG = str_replace("{".$k."}", $v, $strConSG);
}
//生肖
for($i = 1; $i <= 12; $i++){
	$strCon1718 = str_replace("{Animals".$i."}", $_arrAnimals[$i], $strCon1718);
	//$strCon1718 = str_replace("{AnimalsNumber".$i."}", $_arrAnimalsParams[$i], $strCon1718);
	$strCon1920 = str_replace("{Animals".$i."}", $_arrAnimals[$i], $strCon1920);
	//$strCon1920 = str_replace("{AnimalsNumber".$i."}", $_arrAnimalsParams[$i], $strCon1920);
	$strCon3237 = str_replace("{Animals".$i."}", $_arrAnimals[$i], $strCon3237);
	$strCon29 = str_replace("{HelfColor".(string)($i - 1)."}", $_strSame_String["SHelfColor".(string)($i - 1)], $strCon29);
	$strCon29 = str_replace("{HelfColorNumber".(string)($i - 1)."}", $_arrHelfColor[$i - 1], $strCon29);
}
//尾數
for($i = 0; $i <= 9; $i++){
	$strCon1920 = str_replace("{Mantissa".$i."}", $i."&nbsp;".$_strSame_String["Mantissa"], $strCon1920);
	$strCon3843 = str_replace("{Mantissa".$i."}", $i."&nbsp;".$_strSame_String["Mantissa"], $strCon3843);
}
//色波
for($i = 0; $i <= 2; $i++){
	$strCon121314 = str_replace("{Color".$i."}", $_strSame_String["Color".$i], $strCon121314);
	$strCon15 = str_replace("{Color".$i."}", $_strSame_String["Color".$i], $strCon15);
	$strCon1718 = str_replace("{Color".$i."}", $_strSame_String["Color".$i], $strCon1718);
}
//正碼 1- 6
for($i = 1; $i <= 6; $i++){
	$strCon121314 = str_replace("{NormalNo".$i."}", $_strSame_String["NormalNo".$i], $strCon121314);
	$strCon15 = str_replace("{NormalNo".$i."}", $_strSame_String["NormalNo".$i], $strCon15);
	$strCon2126 = str_replace("{NormalNo".$i."}", str_replace("1", $i, $_strOperate["NormalSpecial1"]), $strCon2126);
}
$strCon121314 = str_replace("{SOdd}", $_strSame_String[SOdd], $strCon121314);
$strCon121314 = str_replace("{SEven}", $_strSame_String[SEven], $strCon121314);

$strCon = "\nvar OddsLayer = {}, objListStatus = {}; \n";
$strCon .= "OddsLayer.Layer1='".addslashes($strCon010203)."';\n";
$strCon .= "OddsLayer.Layer4='".addslashes($strCon040506)."';\n";
$strCon .= "OddsLayer.Layer7='".addslashes($strCon0711)."';\n";
$strCon .= "OddsLayer.Layer12='".addslashes($strCon121314)."';\n";
$strCon .= "OddsLayer.Layer15='".addslashes($strCon15)."';\n";
$strCon .= "OddsLayer.Layer17='".addslashes($strCon1718)."';\n";
$strCon .= "OddsLayer.Layer19='".addslashes($strCon1920)."';\n";
$strCon .= "OddsLayer.Layer21='".addslashes($strCon2126)."';\n";
$strCon .= "OddsLayer.Layer29='".addslashes($strCon29)."';\n";
$strCon .= "OddsLayer.Layer31='".addslashes($strCon31)."';\n";
$strCon .= "OddsLayer.Layer32='".addslashes($strCon3237)."';\n";
$strCon .= "OddsLayer.Layer38='".addslashes($strCon3843)."';\n";
$strCon .= "OddsLayer.LayerStart='".addslashes($strConSG)."';\n";

$strCon .= "objListStatus.T1 = '".$_strOperate["SpecialNumber"]."A';\n";
$strCon .= "objListStatus.T28 = '".$_strOperate["SpecialNumber"]."B';\n";
$strCon .= "objListStatus.T4 = '".$_strOperate["NormalNumber"]."';\n";
$strCon .= "objListStatus.T7 = '".$_strOperate["JoinNumber"]."';\n";
$strCon .= "objListStatus.T12 = '".$_strOperate["NormalNumber1_6"]."';\n";
$strCon .= "objListStatus.T15 = '".$_strOperate["NormalNumberParlays"]."';\n";
$strCon .= "objListStatus.T17 = '".$_strOperate["AnimalsColor"]."';\n";
$strCon .= "objListStatus.T19 = '".$_strOperate["AnimalsMantissa"]."';\n";
$strCon .= "objListStatus.T21 = '".$_arrBet_Type[1][21]."';\n";
$strCon .= "objListStatus.T22 = '".$_arrBet_Type[1][22]."';\n";
$strCon .= "objListStatus.T23 = '".$_arrBet_Type[1][23]."';\n";
$strCon .= "objListStatus.T24 = '".$_arrBet_Type[1][24]."';\n";
$strCon .= "objListStatus.T25 = '".$_arrBet_Type[1][25]."';\n";
$strCon .= "objListStatus.T26 = '".$_arrBet_Type[1][26]."';\n";
$strCon .= "objListStatus.T29 = '".$_strOperate["HelfColor"]."';\n";
$strCon .= "objListStatus.T31 = '".$_strOperate["FiveNotWin"]."';\n";
$strCon .= "objListStatus.T32 = '".$_strOperate["AnimalsJN"]."';\n";
$strCon .= "objListStatus.T38 = '".$_strOperate["MantissaJN"]."';\n";
$strCon .= "objListStatus.TSG = '".$_strOperate["StartGame"]."';\n";

$strFile = __Root_Path."/inc/Operate2Temp".$_intLang.".js";
if(!writeFile($strFile, $strCon, "w"))ErrMsgOutputHTML("Error", "", 1);

?>